OfficeTips Home || VBA Section || General Section || Download Section || Privacy Policy Bookmark and Share

PowerPoint VBA


 
Add-ins
 Image Importer Wizard
 Import tons of images in a jiffy
 
Secure Pack
Distribute Secure Presentations
 
Shyam's Toolbox
Increase your productivity
 
Handout Wizard
Create customized handouts
 
Animation Carbon
Copy, store, distribute animations
 
More downloads

 

Selecting the slide master slide

Need a way to select the slide master for any design? Check this example.

List of Events available in each version of PowerPoint

Comprehensive list of events available in PowerPoint

Compress media

Tap into the built-in compression settings to resample a specific shape

Minimum Required:  PowerPoint 2013+

Control the media player

Media player programmatic access explained.

Minimum Required:  PowerPoint 2013+

Slide sorter during Slide Show 

Slide navigation view explained.

Minimum Required:  PowerPoint 2013+

Create Harvey Balls   

Create native harvey balls and workaround some caveats

Minimum Required:  PowerPoint 2013+

Insert custom SmartArt programmatically

Get the reference to a custom smartart

Minimum Required:  PowerPoint 2010

Get slide size information of variants stored in a theme

Enumerate slide information of variants stored in the theme

Minimum Required:  PowerPoint 2013

Detect MathZones in PPT 2010

Workaround to detect if shape has a math zone

Minimum Required:  PowerPoint 2010

Updated Comments object

Use the updated Comments object.

Minimum Required:  PowerPoint 2013

Guides object

Use the new Guides object to add, position and manipulate guides.

Required:  PowerPoint 2013

New application events in PowerPoint 2013

Looks at the two new application level events

Required:  PowerPoint 2013

 Transfer animation to another identical slide

Make use of the PickupAnimation and ApplyAnimation methods in PPT 2010+

Required:  PowerPoint 2010+

 

Picture Effects Object

Learn about how to apply the new picture effects available in PowerPoint 2010

Required:  PowerPoint 2010+

 

How to detect when video generation has completed

Learn how to set track status of the video during the creation process.

Required:  PowerPoint 2010+

 

How to use msoAnimEffectPlayFromBookmark

Learn how to set animation to play from a specific point in the video/audio

Required:  PowerPoint 2010+

 

Create multiple undo entries for automated code

Create logical blocks of Undo entries when a macro is executed.

Required:  PowerPoint 2010+

 

 Detect line with gradients

Use a workaround to detect if a gradient line style has been applied.

Required:  PowerPoint 2007

 

 Copy slides with source formatting with PPT 2010

Use the PasteSourceFormatting controlID to paste slides
Required:  PowerPoint 2010

 

 Find and remove animations associated with a bookmark or specific to shape on a bookmark trigger

Locate any bookmark trigger for a shape and remove animations from the timeline or simply remove all bookmark triggers associated with a bookmark.
Required:  PowerPoint 2010


Context menus are back in 2010

Create a button in the Section context menu
Required:  PowerPoint 2010


Make custom show from slides in a section

Use the button created above to make a custom show from the selection section.
Required:  PowerPoint 2010

Protected View?

Get better understanding on the  Protected View
Required:  PowerPoint 2010


How to open a presentation in Protected View

How to manipulate Protected View programmatically. Use it to open password protected presentations.
Required:  PowerPoint 2010


Protected view events and behavior

What are the  events associated with Protected View Window.
Required:  PowerPoint 2010

 

Sections

Introduction to the  Sections feature available in PPT 2010
Required:  PowerPoint 2010

 

MediaFormat and Bookmark Triggers

Check out the  MediaFormat object which also introduces Bookmarks - a way to sync animation to a media timeline.
Required:  PowerPoint 2010

 

SmartArt object

SmartArt is now an object that is natively supported in PPT 2010
Required:  PowerPoint 2010

 

How to extract text from SmartArt...

A routine to work around limitations in extracting text and hyperlink info from smartart using vba

Required:  PowerPoint 2007 or later

 

How to determine the cursor position in slide sorter view...

A simple workaround to arrive at the cursor position even if no slides are selected in the slide sorter view.

Required:  PowerPoint 97 or later

 

Timeline – The animation engine in PowerPoint 2002/2003 - Part I

Introduction to the Timeline object and more about animation information in PowerPoint 2002/2003

Required:  PowerPoint 2002 or later

 

VBA newbie

A  section for the PowerPoint VBA newbie. Contains commonly requested routines by a beginner to PowerPoint VBA

Required:  PowerPoint 97 or later

 

How to activate the outline/thumbnails tab

Set either outline/slides tabs as the active tab in the normal view, something which is not possible using the object model directly.

Required:  PowerPoint 2002 or later

 

Add items to the ' Presentation' task pane

Learn how to add items to the  Presentation task pane programmatically or thru registry hacks

Required:  PowerPoint 2002 or later

 

Enumerate Hyperlinks in a presentation and associated objects

List out all hyperlinks in the presentation and learn more about how to use the useful Parent property.

Required:  PowerPoint 97 or later

 

Inter-presentation communication

Two techniques to exchange variable values between two independent presentation.

Required:  PowerPoint 97 or later


 

Extract Slide selection as Presentation

Select slides in the active presentation and create a  presentation from this selection.

Required:  PowerPoint 97 or later


 

Assign interactive animation

Code which illustrates how to assign an animation to a shape and have it triggered by clicking another shape.
Required:  PowerPoint 2002 or later

 

Ascertain if a shape is animated

Code which illustrates how to assign an animation to a shape and have it triggered by clicking another shape.
Required:  PowerPoint 2002 or later

 

Set table border colour

Create a wrapper to format borders for a PowerPoint table
Required:  PowerPoint 2000 or later


Delete empty autoshapes/textboxes

A clean up routine to delete shapes with no fill, no border and no text.
Required:  PowerPoint 97 or later


Find and Recolor

Learn how find and replace one color with another on fills, text and borders

Required:  PowerPoint 97 or later

 

How to apply designs to various slides (2002+)

Learn how to assign a design other than the default in PowerPoint XP using the Design property

Required:  PowerPoint 2002 or later

 

Locate specific text and format the shape containing it

Search for text in shapes and apply customized formatting to shapes containing the specified text.

Required:  PowerPoint 97 or later

 

Locate and highlight instances of a specific word

Locate the keyword and highlight each instance with desired formatting.

Required:  PowerPoint 97 or later

 

Export Slides within a Presentation as files

Split up slides in a presentation into individual files while still retaining it's formatting.

Required:  PowerPoint 97 or later


Create a presentation of slide images

Make use of the slide thumbnail available in the notes page to paste slide images into a  presentation.

Required:  PowerPoint 97 or later


Roll Over Demonstration

Sample demonstration to simulate a rollover effect in PowerPoint.

Required:  PowerPoint 97 or later



Break OLE links programmatically

Workaround the in-availability of a break links method in the Object model for linked files.

Required:  PowerPoint 97 or later



How to extract images from a presentation
 

Routine which extracts all images from a presentation at original resolutions.

Required:  PowerPoint 97 or later


 

Copy slides with source formatting

Copy slides while still retaining the source design.

Required:  PowerPoint 2002 or later



Manipulating Tables in PowerPoint

More manipulation of Tables in PowerPoint ...

Learn how to insert MS word tables into a slide and how to manipulate the  native PowerPoint table shape. The native table shape is supported only with PowerPoint version 2000 and above.

Required:  PowerPoint 97 or later

 

Multiple templates in PowerPoint 2002/XP

A look at the  Designs object in PowerPoint XP which introduces support for multiple design templates.

Required:  PowerPoint 2002 or later

 

The PowerPoint Add-in FAQ

Comprehensive collection of most commonly asked questions related to the PowerPoint add-ins.

 

Toggle images on every click on the shape

Code which toggles a given pair of images every time it is clicked during the slide show.

Required:  PowerPoint 97 or later

 

Automate PowerPoint and insert an image on the slide

Code to insert an image onto a slide and scale it to it's original size.

Required:  PowerPoint 97 or later

 

 

What is a Bounding Box in a shape's text range?

A brief explanation of what the bounding box associated with the text range object is!!

Required:  PowerPoint 97 or later

 

 

Create an agenda slide with hyperlinks to the slides

Generate an agenda slide quickly with hyperlinks to the component slides of the presentation.

Required:  PowerPoint 97 or later

 

 

Programmatically restore an image to it's original state

Restore the default state (original size, brightness, contrast etc) of an image shape imported into the slide.

Required:  PowerPoint 97 or later

 

 

Generic function to obtain the current slide object in any view

A generic function which accepts the active window and returns the active slide object in that window.

Required:  PowerPoint 97 or later

 

 

How to activate a graph object in a separate window

Graph object always opens up within PowerPoint. Lean how to programmatically open the object in a separate window.

Required:  PowerPoint 97 or later

 

 

How to display in-built 'Open/Save As' dialogs in PowerPoint

Manipulate hidden Dialog object to display the common dialogs. Officially Dialogs are a part of the PowerPoint object model. We make use of some undocumented stuff to make it work.

Required:  PowerPoint 97, 2000 only

 

Offset the data labels of a graph object on a slide

Manipulate data labels of a graph object using code

Required:  PowerPoint 97 or later

 

How to determine the current cursor position in Slide View

Locate the where the cursor is located currently, the area of selection etc

Required:  PowerPoint 97 or later 

 

Reference an ActiveX control on a slide in VBA

Learn how to get a reference to the activex control placed on a slide

Required:  PowerPoint 97 or later 

 

Get a reference to the Title shape on a slide

Multiple ways in which one can get a reference to the title shape on the slide.

Required:  PowerPoint 97 or later 

 

How to programmatically pause a show.

Pause a show, this works even in kiosk mode of a show which otherwise does not provide any way of pausing a show.

Required:  PowerPoint 97 or later 

 

Print the current slide in a show

How to print the current slide being displayed in the show

Required:  PowerPoint 97 or later 

 

How to determine which shape was clicked

A quick method to ascertain which shape was clicked by the user.

Required:  PowerPoint 97 or later 

 

How to update information within unrelated excel objects inserted in slides of a presentation

Makes use of the events supported by Excel to update values across various Excel objects in the presentation

Required:  PowerPoint 97 or later 

 

Two methods to play sound files (*.WAV) files synchronously/asynchronously

Make use of two API calls to get the desired effect.

Required:  Word, PowerPoint, Excel ( 97 or later)

  

Global Find And Replace routine in PowerPoint

Learn to correctly implement the Replace method in PowerPoint

Required:  PowerPoint 97 or later 

 

Power Point VBA Equivalent of Application.ScreenUpdating method

Learn how to prevent the Main PowerPoint Window from redrawing while performing screen intensive routines.

Required:  PowerPoint 97 or later 

 

How to open a PowerPoint Show (*.pps) file programatically

Workaround the default behaviour of Presentation.Open method to open the *.pps files in Slide Show mode.

Required:  PowerPoint 97 or later 

 

Paste Excel chart as pictures in PowerPoint (Paste Special)

Workaround the absence of Paste Special method. The routine explains how to make use of the Excel CopyPicture method to paste charts as pictures.

Required:  PowerPoint / Excel (97 or later)

  

Clear all the animations

Helper routine to wipeout all the custom animations set in the presentation

Required:  PowerPoint 97 or later

 

Exporting All Slide Titles To A Text File

Helper routine to export titles of all the slides in the presentation to a text file. Will shortly be  to copy the titles to clipboard too.

Required:  PowerPoint 97 or later 

 

Restore the Insert Word Table button on the Standard toolbar (PPT 2000)

One line routine to create the original Insert Word Table button on the PowerPoint toolbar

Required:  PowerPoint 97 or later 

 

Simulate a countdown timer using Sleep API

Show a countdown on a slide. Example of using the Sleep API

Required:  PowerPoint 97 or later 

 

Using SetTimer-KillTimer API in PowerPoint 2000

Learn to make use of the AddressOf keyword introduced in Office 2000 to create a Timer in PowerPoint.

Required:  PowerPoint 2000 or later

 

Disable the "Update links" dialog box

Prevent the Links Update box from appearing every time you open a presentation with links.

Required:  PowerPoint 97 or later 

 

Quiz in PowerPoint using VBA

Make use of the inherent features of VBA to create a quiz very quickly. 

Required:  PowerPoint 97 or later 

 

Use CreateObject to Print Slides From A Presentation

Example of using the CreateObject Function to print slides . 

Required:  PowerPoint 97 or later 

 

 

 


Office VBA

Add-ins
FaceID Browser
Peruse thru all Office menu icons

 

Generic class wrapper which reads the UserInfo key in the registry

Read registry values which are not accessible natively.

Required:  Excel, PowerPoint Word (97 & 2000)

How to clear the Clipboard in Office 2000

A suggested workaround to deal  with unavailability of a direct method to clear the multiple clippings supported by Office 2000

Required:  Excel, PowerPoint, Word ( 2000)

How to set two toolbars on the same row

How to make toolbars share the same row in their docked states.

Required:  Excel, PowerPoint, Word (97 or later)

How to determine the which Command Bar button was clicked

How to ascertain which was the button responsible for the procedure being invoked.

Required:  Excel, PowerPoint, Word (97 or later)

 

 


Excel VBA

 

Highlight all cells containing hyperlink in a sheet

Select all the cells, in the active worksheet, which contain hyperlinks.

Required:  Excel 97 or later

 

 

 

Word VBA

 

Clear all hyperlinks from a Word Document but retain the text

A quick way to get rid of all the blue colored hyperlinks, yet ensure that the text isn't deleted.

Required:  Word 97 or later

Extract Embedded PowerPoint Slides from a Word Document

A Word macro to extract embedded slides within a document as presentations.

 


Copyright 1999-2018 (c) Shyam Pillai. All rights reserved.